home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / linux-bo / etherboo.000 / etherboo / etherboot-2.0 / netboot-freebsd / Makefile.32 < prev    next >
Makefile  |  1996-06-22  |  4KB  |  129 lines

  1. #    Makefile,v 1.4 1994/12/31 17:16:49 jkh Exp
  2. #
  3. # Makefile for NETBOOT
  4. #
  5. # Basic Options:
  6. #    -DVERSION    - Set the version string
  7. #    -DASK_BOOT    - Ask "Boot from Network (Y/N) ?" at startup
  8. #    -DROMSIZE    - Size of EPROM - Must be set (even for .COM files)
  9. #    -DRELOC        - Relocation address (usually 0x90000)
  10. #                                                     ^^^^^^^
  11. #                         has to be changed to 0x9A000 for loading Linux kernel
  12. #       -DPRIORIZEBOOTPKERNEL
  13. #                       - first honor the kernel name of the BOOTP reply
  14. #                         before trying defaults
  15. #       -DBOOTPKERNELONLY
  16. #                       - never use TFTP for loading default files; the
  17. #                         BOOTP reply has to set a valid kernel name
  18. #    -DINT19H    - Boot ROM hooks into INT19H for delayed boot
  19. #              Alternative is to take control as soon as BIOS
  20. #              detects the ROM
  21. #
  22. # NS8390 Options:
  23. #    -DINCLUDE_WD    - Include Western Digital/SMC support
  24. #    -DINCLUDE_NE    - Include NE1000/NE2000 support
  25. #    -DINCLUDE_3COM  - Include 3c503 support
  26. #       -D_3COM_USE_AUI - Disable transceiver on 3c503 by default
  27. #    -DNE_BASE    - Base I/O address for NE1000/NE2000
  28. #    -DNE_NOSCAN    - Do not try to automatically find NEx000 I/O address
  29. #       -D_3COM_BASE    - Base I/O address for 3c503
  30. #    -DWD_DEFAULT_MEM- Default memory location for WD/SMC cards
  31. # XXX nothing depends on this Makefile so you must run `make clean' after
  32. # changing an option.
  33. #
  34.  
  35. PROG=    wd.com 3c503.com ne.com 3c509.com wd.rom 3c503.rom ne.rom 3c509.rom
  36. # Order is very important on the SRCS line for this prog
  37. SRCS=    start2.S  main.c linuxloader.c misc.c bootmenu.c rpc.c
  38. OBJS=   start2.o  main.o linuxloader.o misc.o bootmenu.o rpc.o
  39. ROBJS=  start2.ro main.o linuxloader.o misc.o bootmenu.o rpc.o
  40. TOBJS=  start2.ro test.o misc.o
  41.  
  42. CFLAGS=        -DVERSION=\"2.0\" -DNFS -DROMSIZE=${ROMSIZE} -DRELOC=${RELOCADDR}
  43. CFLAGS+=    -O2 -fstrength-reduce -fomit-frame-pointer -m386
  44. CFLAGS+=    -Wall -Wno-format -Wno-unused
  45. CFLAGS+=        -DPRIORIZEBOOTPKERNEL -DINT19H
  46. WDFLAGS=    -DINCLUDE_WD -DWD_DEFAULT_MEM=0xD0000
  47. T503FLAGS=    -DINCLUDE_3COM -D_3COM_BASE=0x300
  48. T509FLAGS=
  49. NEFLAGS=    -DINCLUDE_NE -DNE_BASE=0x300
  50. CLEANFILES=    ${OBJS}
  51. CLEANFILES+=    makerom start2.ro wd.o 3c503.o ne.o 3c509.o test.o *.com *.rom *.tmp *.tst
  52. LDFLAGS+=    -N -Ttext ${RELOCADDR} -e _start -nostdlib
  53.  
  54. ROMSIZE=16384
  55. RELOCADDR=0x9A000
  56.  
  57. .SUFFIXES:    .ro .tst .rom .com
  58.  
  59. all: ${PROG}
  60.  
  61. clean:
  62.     ${RM} -rf ${CLEANFILES}
  63.  
  64. .S.ro:
  65.     ${CC} ${CFLAGS} -DBOOTROM -o $@ -c $<
  66.  
  67. .S.o:
  68.     ${CC} ${CFLAGS}           -o $@ -c $<
  69.  
  70. .o.tst:
  71.     ${LD} ${LDFLAGS} -o $*.tmp ${TOBJS} $*.o
  72.     size $*.tmp
  73.     objdump -k -q -o ${RELOCADDR} $*.tmp > $@
  74.     makerom $@
  75.  
  76. .o.rom:
  77.     ${LD} ${LDFLAGS} -o $*.tmp ${ROBJS} $*.o
  78.     size $*.tmp
  79.     objdump -k -q -o ${RELOCADDR} $*.tmp > $@
  80.     makerom $@
  81.  
  82. .o.com:
  83.     ${LD} ${LDFLAGS} -o $*.tmp ${OBJS} $*.o
  84.     size $*.tmp
  85.     objdump -k -q -o ${RELOCADDR} $*.tmp > $@
  86.  
  87. $(OBJS):    linuxdef.h netboot.h
  88.  
  89. wd.o:    ns8390.c linuxdef.h netboot.h
  90.     ${CC} $(CFLAGS) $(WDFLAGS) -o $@ -c $<
  91.  
  92. 3c503.o:    ns8390.c linuxdef.h netboot.h
  93.     ${CC} $(CFLAGS) $(T503FLAGS) -o $@ -c $<
  94.  
  95. 3c509.o:    3c509.c linuxdef.h netboot.h
  96.     ${CC} $(CFLAGS) $(T509FLAGS) -o $@ -c $<
  97.  
  98. ne.o:    ns8390.c linuxdef.h netboot.h
  99.     ${CC} $(CFLAGS) $(NEFLAGS) -o $@ -c $<
  100.  
  101. makerom: makerom.c
  102.     ${CC} -o $@ -DROMSIZE=${ROMSIZE} makerom.c
  103.  
  104. # targets for making test ROMs
  105.  
  106. wd.tst:        makerom start2.ro ${TOBJS} wd.o
  107.  
  108. 3c503.tst:    makerom start2.ro ${TOBJS} 3c503.o
  109.  
  110. ne.tst:        makerom start2.ro ${TOBJS} ne.o
  111.  
  112. 3c509.tst:    makerom start2.ro ${TOBJS} 3c509.o
  113.  
  114. wd.rom:        makerom start2.ro ${ROBJS} wd.o
  115.  
  116. 3c503.rom:    makerom start2.ro ${ROBJS} 3c503.o
  117.  
  118. ne.rom:        makerom start2.ro ${ROBJS} ne.o
  119.  
  120. 3c509.rom:    makerom start2.ro ${ROBJS} 3c509.o
  121.  
  122. wd.com:        start2.o ${OBJS} wd.o
  123.  
  124. 3c503.com:    start2.o ${OBJS} 3c503.o
  125.  
  126. ne.com:        start2.o ${OBJS} ne.o
  127.  
  128. 3c509.com:    start2.o ${OBJS} 3c509.o
  129.